const express = require('express')
const router = express.Router()
const user = require('../router_handle/user')
const expressJoi = require('@escook/express-joi')
const { userRegister } = require('../validator/index')

/**
 * 用户注册
 */
router.post('/register', expressJoi(userRegister), user.register)

/**
 * 用户登陆
 */
router.post('/login', user.login)

/**
 * 获取用户信息
 */
router.get('/getinfo', user.getinfo)
/**
 * 修改用户信息
 */
router.post('/changeUserinfo', user.changeUserinfo)

module.exports = router
